package com.hoshiicloud.user.service.usercenter;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.exception.ServiceException;
import com.hoshiicloud.user.entity.usercenter.MemberIntegration;

import java.util.List;

/**
 * 用户积分Service接口
 *
 * @author : yangcheng
 * @date : 2019/5/13 10:34
 * @mail : maiboyc@163.com
 **/
public interface IMemberIntegrationService extends IService<MemberIntegration> {

    /**
     * 根据id获取
     * @param id ID
     * @return MemberIntegration
     */
    MemberIntegration getById(Long id);

    /**
     * 根据一组id
     * @param ids id组
     * @return List<MemberIntegration>
     */
    List<MemberIntegration> getByIds(List<Long> ids);

    /**
     * 保存
     * @param entity 实体对象
     * @return boolean
     */
    Long insert(MemberIntegration entity) throws ServiceException;

    /**
     * 修改
     * @param entity 实体对象
     * @return boolean
     */
    Long update(MemberIntegration entity) throws ServiceException;

    /**
     * 查询
     * @param entity 查询参数实体
     * @return IPage<MemberIntegration>
     */
    IPage<MemberIntegration> List(MemberIntegration entity);

    /**
     * 删除
     * @param id ID
     * @return boolean
     */
    boolean delete(Long id) throws ServiceException;

    /**
     * 根据条件查询消费者积分
     * @param entity 消费者ID
     * @return IPage<MemberIntegration>
     */
    List<MemberIntegration> getMemberIntegrations(MemberIntegration entity);

    /**
     * 根据消费者ID获取消费者积分
     * @param consumerId 消费者ID
     * @return MemberIntegration
     */
    MemberIntegration getMemberIntegrationsByConsumerId(Long consumerId);

}
